<?php $this->_extends('_layouts/bocib_layout'); ?>

<?php $this->_block('content');?>

<div id="content">
    <h2>所有已上传课件</h2>
    <p class="jump"><a href="<?=url('BoFaculty/FacultyTdocAdd');?>">上传新课件 >></a></p>
    <table>
        <tr>
            <th class="tdoc_id">id</th>
            <th class="name">教师姓名</th>
            <th class="course">课程名称</th>
            <th class="filename">课件名</th>
            <th class="created">上传时间</th>
            <th class="size">课件大小</th>
            <th class="edit">更新</th>
            <th class="delete">删除</th
        </tr>
        <?php foreach($tdocs as $tdoc) { ?>
        <tr>
            <td><?=$tdoc->tdoc_id;?></td>
            <td><?=$_SESSION['lname'];?></td>
            <td><?=Course::find('course_id = ?', $tdoc->course_id)->query()->course;?></td>
            <td><?=$tdoc->filename;?></td>
            <td><?=date('Y-m-d', $tdoc->created);?></td>
            <td><?=$tdoc->size;?></td>
            <td><a href="<?=url('BoFaculty/editTdoc', array('tdoc_id'=>$tdoc->tdoc_id));?>">更新</a></td>
            <td><a href="<?=url('BoFaculty/deletetdoc', array('tdoc_id'=>$tdoc->tdoc_id));?>">删除</a></td>
        </tr>
        <?php } ?>
    </table>
</div><?php $this->_endblock('content');?>